﻿using System;
using System.Runtime.Serialization.Formatters.Binary;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Nature.Toolkit.GMix
{
    [Serializable]
    public class MixSetupInfo : ICloneable
    {
        public MixSetupInfo()
        {
            
        }

        public Temperature? DefaultTemperature { get; set; }

        public Pressure? DefaultPressure { get; set; }

        public MixSetupInfo Clone()
        {
            using (MemoryStream ms = new MemoryStream())
            {
                BinaryFormatter formatter = new BinaryFormatter();
                formatter.Serialize(ms, this);
                ms.Flush();
                ms.Seek(0, SeekOrigin.Begin);
                return (MixSetupInfo)formatter.Deserialize(ms);
            }
        }

        #region ICloneable Members

        object ICloneable.Clone()
        {
            return this.Clone();
        }

        #endregion
    }
}
